#ifndef APPBUTTON_H
#define APPBUTTON_H

#include <QToolButton>
#include <QMouseEvent>
#include <QTimer>
#include <QMenu>
#include <QAction>

class AppButton : public QToolButton
{
    Q_OBJECT

public:
    AppButton(QWidget *parent);
    ~AppButton();

signals:
    void delBtn();

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseDoubleClickEvent(QMouseEvent *event);
    void focusInEvent(QFocusEvent *event);
    void focusOutEvent(QFocusEvent *event);
    void mouseSingleClickEvent();

private:
    QTimer *timer;

    QMenu *menu;
    QAction *open;
    QAction *del;
};

#endif // APPBUTTON_H
